/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */


function Exit(scene, stage)
{
    this.scene = scene;
    var index = parseInt(stage.indexOf('e'));
    
    this.x = blockX * parseInt(index%lineWidth);;
    this.y = blockY * parseInt(index/lineWidth);
    this.angle = 1;
    this.offset = 20;
    this.image = new Image();            
    this.image.src = "img/spiral_new3.png";
    this.Draw = function()
    {
        
        this.scene.Context.fillStyle = 'rgba(0,0,0,1)';   
              this.angle-=30;
        this.scene.RotateAt(this.angle, this.x+this.offset, this.y+this.offset );
            this.scene.Context.drawImage(this.image, this.x, this.y);
        this.scene.RotateAt(-this.angle, this.x+this.offset, this.y+this.offset );
        
        this.scene.Context.fillStyle = 'rgba(0,0,0,1)';   
  
    };
    


}